import PySimpleGUI as sg

# sg.theme('Dark Blue 3')  # please make your windows colorful
#
# layout = [[sg.Text('SHA-1 and SHA-256 Hashes for the file')],
#                  [sg.InputText(), sg.FileBrowse()],
#                  [sg.Submit(), sg.Cancel()]]
# 
# window = sg.Window('SHA-1 & 256 Hash', layout)
#
# event, values = window.read()
# window.close()
#
# source_filename = values[0]     # the first input element is values[0]
####################
import PySimpleGUI as sg

sg.theme('Dark Blue 3')  # please make your windows colorful

event, values  = sg.Window('SHA-1 & 256 Hash', [[sg.Text('SHA-1 and SHA-256 Hashes for the file')],
                        [sg.InputText(), sg.FileBrowse()],
                        [sg.Submit(), sg.Cancel()]]).read(close=True)

source_filename = values[0]     # the first input element is values[0]